#pragma once

#include "IOfficeFile.h"
#include "unzip.h"
#include "helper.h"
#include "tinyxml/tinyxml2.h"
using namespace std;
using namespace tinyxml2;
#include<sstream>
#include<vector>
#include<map>
struct LineInfo
{
	int lineIndex;
	std::vector<std::string> array;
};

class ExcelOOXMLFile :public IOfficeFile
{
public:
	ExcelOOXMLFile(string filePath);
	~ExcelOOXMLFile();

	void ParagraphText(std::string val) { _paragraphText = val; }
	std::string ParagraphText();
	ERRORTYPE getResult();
	void ReadContent(string filePath);
	void  _getValueArray(HZIP hz);

	void deleteNum(std::string & content);
	bool isNumber(std::string & content);
	int getColIndex(std::string & content);
private:
	
	
	//std::map<int, LineInfo> excelHash;
	vector <std::map<int, LineInfo> >vecExcel;
	std::vector<std::string> valueArray;

	void parseBody(XMLElement *rootNode);
	std::vector<LineInfo> getSheetArray();
	

	string _paragraphText;
};

